package com.sinoglobal.dumping.base;

import android.util.Log;


/**
 * Log工具类 d e i v w五种打印 Log功能默认关闭。需要手动更改DEBUG的值
 * 
 * @author KEZHUANG
 */
public class Dumpling_SinoLogUtil {
	
	public static final boolean DEBUG = Dumpling_SinoConfig.sLogSwitch;
	public static final String TAG = Dumpling_SinoConfig.sLogTag;

	public static void i(Object object) {
		ii(TAG,object);
	}

	public static void d(Object object) {
		dd(TAG,object);
	}

	public static void e(Object object) {
		ee(TAG,object);
	}

	public static void v(Object object) {
		vv(TAG,object);
	}

	public static void w(Object object) {
		ww(TAG,object);
	}
	
	 public static void e(Object object, Throwable tr) {
		 if (DEBUG){
			 if (object == null) {
				 e("标签" + TAG + "的打印内容为空！");
				 return ;
			 }
			 Log.e(TAG, object.toString(), tr);
		 }
	 }

	public static void ii(String tag,Object object){
		if(DEBUG){
			if (object == null) {
				i("标签" + tag + "的打印内容为空！");
				return ;
			}
			Log.i(tag, object.toString());
		}
	}
	public static void dd(String tag,Object object){
		if (DEBUG) {
			if (object == null) {
				d("标签" + tag + "的打印内容为空！");
				return ;
			}
			Log.d(tag, object.toString());
		}
	}
	public static void ee(String tag,Object object){
		if (DEBUG) {
			if (object == null) {
				e("标签" + tag + "的打印内容为空！");
				return ;
			}
			Log.e(tag, object.toString());
		}
	}
	public static void vv(String tag,Object object){
		if (DEBUG) {
			if (object == null) {
				v("标签" + tag + "的打印内容为空！");
				return ;
			}
			Log.v(tag, object.toString());
		}
	}
	public static void ww(String tag,Object object){
		if (DEBUG) {
			if (object == null) {
				w("标签" + tag + "的打印内容为空！");
				return ;
			}
			Log.w(tag, object.toString());
		}
	}
}
